home *** CD-ROM | disk | FTP | other *** search
/ il gioco del Kamasutra / Milo Manara Kamasutra.iso / mac / DATA / ParteIII / GameI / Spada.dir / 00032_Script_32 < prev    next >
Text File  |  1997-11-24  |  3KB  |  86 lines

  1. on mouseEnter
  2.   set the cursor of sprite 35 to [the number of cast "MouseOpen", the number of cast "MouseOpenMask"]
  3. end mouseEnter
  4.  
  5. on mouseleave
  6.   
  7.   set the visible of sprite 35 to 0
  8.   
  9. end mouseleave
  10.  
  11.  
  12. on mousedown
  13.   
  14.   global oldloc, x0, y0
  15.   puppetsprite 35, true
  16.   set the cursor of sprite 35 to [the number of cast "MouseClose", the number of cast "MouseCloseMask"]
  17.   set x0 = the loch of sprite 35
  18.   set y0 = the locv of sprite 35
  19.   repeat while the stilldown
  20.     set the loc of sprite 35 to point(the mouseH,the mouseV)
  21.     updatestage
  22.   end repeat
  23.   Puppetsound 3,"Click2"
  24. end mousedown
  25.  
  26. on mouseUp
  27.   global oldloc, x0, y0, x1, y2, passo
  28.   global oldloc, UomoTesto1, UomoTesto2, UomoTesto3, UomoCard1, UomoCard2, UomoCard3
  29.   global Coppia1, Coppia2, Coppia3, Test1, Test2, Test3
  30.   set the cursor of sprite 35 to [the number of cast "MouseOpen", the number of cast "MouseOpenMask"]
  31.   if (Test1 = 0) and (inside(the loc of sprite 35, the rect of sprite 14 ) = 1) then
  32.     set the loc of sprite 35 to oldloc
  33.     puppetsprite 35, 0
  34.     set the membernum of sprite 21 to (the membernum of sprite 35)
  35.     set the loc of sprite 21 to point(85, 361)
  36.     set UomoCard1 = the name of member (the membernum of sprite 35)  
  37.     set the text of member 17 to "Uomo " & (the name of member (the membernum of sprite 35))
  38.     put the text of member 17 into UomoTesto1
  39.     updatestage
  40.   else if (Test2 = 0) and (inside(the loc of sprite 35, the rect of sprite 15 ) = 1) then
  41.     set the loc of sprite 35 to oldloc
  42.     puppetsprite 35, 0
  43.     set the membernum of sprite 22 to (the membernum of sprite 35)
  44.     set UomoCard2 = the name of member (the membernum of sprite 35)
  45.     set the loc of sprite 22 to point(275, 361)
  46.     set the text of member 18 to "Uomo " & (the name of member (the membernum of sprite 35))
  47.     put the text of member 18 into UomoTesto2
  48.     updatestage
  49.   else if (Test3 = 0) and (inside(the loc of sprite 35, the rect of sprite 16 ) = 1) then
  50.     set the loc of sprite 35 to oldloc
  51.     puppetsprite 35, 0
  52.     set the membernum of sprite 23 to (the membernum of sprite 35)
  53.     set the loc of sprite 23 to point(465, 361)
  54.     set UomoCard3 = the name of member (the membernum of sprite 35)
  55.     set the text of member 19 to "Uomo " & (the name of member (the membernum of sprite 35))
  56.     put the text of member 19 into UomoTesto3
  57.     updatestage
  58.   else
  59.     put the loch of sprite 35 into x1
  60.     put the locv of sprite 35 into y1
  61.     set passo = integer(abs(x1-x0))
  62.     
  63.     if x1 <> x0 then
  64.       if x1 > x0 then
  65.         repeat with n = 20 down to 1
  66.           set the loch of sprite 35 = (x1 - passo/n)
  67.           set the locv of sprite 35 = ((y1-y0)*(x1 - passo/n) + (x1*y0 -x0*y1))/(x1-x0)
  68.           updatestage
  69.         end repeat
  70.       else
  71.         repeat with n = 20 down to 1
  72.           set the loch of sprite 35 = (x1 + passo/n)
  73.           set the locv of sprite 35 = ((y1-y0)*(x1 + passo/n) + (x1*y0 -x0*y1))/(x1-x0)
  74.           updatestage
  75.         end repeat
  76.       end if
  77.     end if
  78.     
  79.     set the loch of sprite 35 = x0
  80.     set the locv of sprite 35 = y0
  81.     updatestage
  82.     
  83.   end if
  84.   
  85. end mouseUp
  86.